<template>
	<view class="container">
		<TopNav title="公告详情" bg-color="#fff"></TopNav>
		<view class="flex flex-direction">
			<text class="f-s20 line-height28 f-w600">{{details.title}}</text>
			<text class="m-t10 text-gray f-s12 line-height20 f-w400">2{{details.create_time}}</text>
			<text v-html="details.content"></text>
		</view>
	</view>
</template>

<script>
	import {
		noticeDetails
	} from "@/api/index"
	export default {
		data() {
			return {
				details:{},
				queryParams: {
					id: ''
				}
			}
		},
		onLoad(query) {
			if (query.id) {
				this.queryParams.id = query.id
				this.getDetail()
			}
		},

		methods: {
			getDetail() {
				noticeDetails(this.queryParams).then(res => {
					console.log('res: ', res);
					this.details = res.data
				})
			}
		}
	}
</script>
<style lang="scss">
	page {
		background-color: #fff;
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);
	}
</style>
<style scoped lang="scss">


	.container {
		padding: 32rpx;
	}
</style>